﻿using System;

namespace Interfase
{
    class Program
    {
        static void Main(string[] args)
        {
            Abutment abutment = new Abutment();
            Console.WriteLine("这是什么？");
            abutment.JourneyToTheWest("西游记！");
            Console.WriteLine("大师兄是谁？");
            abutment.OurLeader = "孙悟空！";
            Console.WriteLine(abutment.OurLeader);
            Console.WriteLine("师父是谁？");
            abutment.Master = "唐僧!";
            Console.WriteLine(abutment.Master);
            Console.WriteLine("妖怪是谁？");
            abutment.Bogy = "老胡!!!";
            Console.WriteLine(abutment.Bogy);

        }

    }
    /// <summary>
    /// 隐式实现
    /// </summary>
    class Abutment : Interface1
    {
        public string OurLeader { get; set; }
        public string Master { get; set; }
        public string Bogy { get; set; }

        public void JourneyToTheWest(string A)
        {
            Console.WriteLine("{0}", A);
        }

    }
    /*
    /// <summary>
    /// 显性实现
    /// </summary>
    class AbutmentTwo : Interface1 {
        string Interface1.OurLeader { get; set; }
        string Interface1.Master { get; set; }
        string Interface1.Bogy { get; set; }

        void Interface1.JourneyToTheWest(string B)
        {
            Console.WriteLine("{0}",B);
        }
    }
    */
}
